home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / OCEMail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  49.2 KB  |  1,589 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        OCEMail.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __OCEMAIL__
  18. #define __OCEMAIL__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __FILES__
  24. #include <Files.h>
  25. #endif
  26. #ifndef __TEXTEDIT__
  27. #include <TextEdit.h>
  28. #endif
  29.  
  30. #ifndef __DIGITALSIGNATURE__
  31. #include <DigitalSignature.h>
  32. #endif
  33. #ifndef __OCE__
  34. #include <OCE.h>
  35. #endif
  36. #ifndef __OCEAUTHDIR__
  37. #include <OCEAuthDir.h>
  38. #endif
  39. #ifndef __OCEMESSAGING__
  40. #include <OCEMessaging.h>
  41. #endif
  42.  
  43.  
  44.  
  45. #if PRAGMA_ONCE
  46. #pragma once
  47. #endif
  48.  
  49. #ifdef __cplusplus
  50. extern "C" {
  51. #endif
  52.  
  53. #if PRAGMA_IMPORT
  54. #pragma import on
  55. #endif
  56.  
  57. #if PRAGMA_STRUCT_ALIGN
  58.     #pragma options align=mac68k
  59. #elif PRAGMA_STRUCT_PACKPUSH
  60.     #pragma pack(push, 2)
  61. #elif PRAGMA_STRUCT_PACK
  62.     #pragma pack(2)
  63. #endif
  64.  
  65. /**************************************************************************************/
  66. /* Common Definitions */
  67. /**************************************************************************************/
  68.  
  69. /* reference to a new or open letter or message */
  70. typedef long                             MailMsgRef;
  71. /* reference to an open msam queue */
  72. typedef long                             MSAMQueueRef;
  73. /* identifies slots managed by a PMSAM */
  74. typedef unsigned short                     MSAMSlotID;
  75. /* reference to an active mailbox */
  76. typedef long                             MailboxRef;
  77. /* identifies slots within a mailbox */
  78. typedef unsigned short                     MailSlotID;
  79. /* identifies a letter in a mailbox */
  80.  
  81. struct MailSeqNum {
  82.     MailSlotID                         slotID;
  83.     long                             seqNum;
  84. };
  85. typedef struct MailSeqNum                MailSeqNum;
  86. /* A MailBuffer is used to describe a buffer used for an IO operation.
  87. The location of the buffer is pointed to by 'buffer'. 
  88. When reading, the size of the buffer is 'bufferSize' 
  89. and the size of data actually read is 'dataSize'.
  90. When writing, the size of data to be written is 'bufferSize' 
  91. and the size of data actually written is 'dataSize'.
  92. */
  93.  
  94. struct MailBuffer {
  95.     long                             bufferSize;
  96.     void *                            buffer;
  97.     long                             dataSize;
  98. };
  99. typedef struct MailBuffer                MailBuffer;
  100. /* A MailReply is used to describe a commonly used reply buffer format.
  101. It contains a count of tuples followed by an array of tuples.
  102. The format of the tuple itself depends on each particular call.
  103. */
  104.  
  105. struct MailReply {
  106.     unsigned short                     tupleCount;
  107.                                                                 /* tuple[tupleCount] */
  108. };
  109. typedef struct MailReply                MailReply;
  110. /* Shared Memory Communication Area used when Mail Manager sends 
  111. High Level Events to a PMSAM. 
  112. */
  113.  
  114. struct SMCA {
  115.     unsigned short                     smcaLength;                    /* includes size of smcaLength field */
  116.     OSErr                             result;
  117.     long                             userBytes;
  118.     union {
  119.         CreationID                         slotCID;                /* for create/modify/delete slot calls */
  120.         long                             msgHint;                /* for kMailEPPCMsgOpened */
  121.     } u;
  122. };
  123. typedef struct SMCA                        SMCA;
  124. /**************************************************************************************/
  125. /* Value of creator and types fields for messages and blocks defined by MailManager */
  126.  
  127. enum {
  128.     kMailAppleMailCreator        = FOUR_CHAR_CODE('apml'),        /* message and letter block creator */
  129.     kMailLtrMsgType                = FOUR_CHAR_CODE('lttr'),        /* message type of letters, reports */
  130.     kMailLtrHdrType                = FOUR_CHAR_CODE('lthd'),        /* contains letter header */
  131.     kMailContentType            = FOUR_CHAR_CODE('body'),        /* contains content of letter */
  132.     kMailEnclosureListType        = FOUR_CHAR_CODE('elst'),        /* contains list of enclosures */
  133.     kMailEnclosureDesktopType    = FOUR_CHAR_CODE('edsk'),        /* contains desktop mgr info for enclosures */
  134.     kMailEnclosureFileType        = FOUR_CHAR_CODE('asgl'),        /* contains a file enclosure, format is defined by AppleSingle */
  135.     kMailImageBodyType            = FOUR_CHAR_CODE('imag'),        /* contains image of letter */
  136.     kMailMSAMType                = FOUR_CHAR_CODE('gwyi'),        /* contains msam specific information */
  137.     kMailTunnelLtrType            = FOUR_CHAR_CODE('tunl'),        /* used to read a tunnelled message */
  138.     kMailHopInfoType            = FOUR_CHAR_CODE('hopi'),        /* used to read hopInfo for a tunnelled message */
  139.     kMailReportType                = FOUR_CHAR_CODE('rpti'),        /* contains report info */
  140.     kMailFamily                    = FOUR_CHAR_CODE('mail'),        /* Defines family of "mail" msgs: content, header, etc */
  141.     kMailFamilyFile                = FOUR_CHAR_CODE('file')        /* Defines family of "direct display" msgs */
  142. };
  143.  
  144. /*    
  145. kMailImageBodyType:
  146.     format is struct TPfPgDir - in Printing.h
  147.     *    struct TPfPgDir {
  148.     *        short    pageCount;        - number of pages in the image.
  149.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  150.     *                                - to image of page n.
  151.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  152.  
  153. kMailReportType:
  154. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  155. This block has a header, IPMReportBlockHeader,
  156. followed by an array of elements, each of type IPMRecipientReport
  157.  
  158. Various families used by mail or related msgs
  159. */
  160.  
  161.  
  162. /**************************************************************************************/
  163.  
  164. typedef unsigned short                     MailAttributeID;
  165. /* Values of MailAttributeID */
  166. /* Message store attributes - stored in the catalog */
  167. /* Will always be present in a letter and have fixed sizes */
  168.  
  169. enum {
  170.     kMailLetterFlagsBit            = 1,                            /* MailLetterFlags */
  171.                                                                 /* Letter attributes - stored in the letter will always be present in a letter and have fixed sizes */
  172.     kMailIndicationsBit            = 3,                            /* MailIndications */
  173.     kMailMsgTypeBit                = 4,                            /* OCECreatorType */
  174.     kMailLetterIDBit            = 5,                            /* MailLetterID */
  175.     kMailSendTimeStampBit        = 6,                            /* MailTime */
  176.     kMailNestingLevelBit        = 7,                            /* MailNestingLevel */
  177.     kMailMsgFamilyBit            = 8,                            /* OSType */
  178.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have fixed sizes */
  179.     kMailReplyIDBit                = 9,                            /* MailLetterID */
  180.     kMailConversationIDBit        = 10,                            /* MailLetterID */
  181.                                                                 /* Letter attributes - stored in the letter may be present in a letter and have variable length sizes */
  182.     kMailSubjectBit                = 11,                            /* RString */
  183.     kMailFromBit                = 12,                            /* MailRecipient */
  184.     kMailToBit                    = 13,                            /* MailRecipient */
  185.     kMailCcBit                    = 14,                            /* MailRecipient */
  186.     kMailBccBit                    = 15                            /* MailRecipient */
  187. };
  188.  
  189. typedef unsigned long                     MailAttributeMask;
  190. /* Values of MailAttributeMask */
  191.  
  192. enum {
  193.     kMailLetterFlagsMask        = 1L << (kMailLetterFlagsBit - 1),
  194.     kMailIndicationsMask        = 1L << (kMailIndicationsBit - 1),
  195.     kMailMsgTypeMask            = 1L << (kMailMsgTypeBit - 1),
  196.     kMailLetterIDMask            = 1L << (kMailLetterIDBit - 1),
  197.     kMailSendTimeStampMask        = 1L << (kMailSendTimeStampBit - 1),
  198.     kMailNestingLevelMask        = 1L << (kMailNestingLevelBit - 1),
  199.     kMailMsgFamilyMask            = 1L << (kMailMsgFamilyBit - 1),
  200.     kMailReplyIDMask            = 1L << (kMailReplyIDBit - 1),
  201.     kMailConversationIDMask        = 1L << (kMailConversationIDBit - 1),
  202.     kMailSubjectMask            = 1L << (kMailSubjectBit - 1),
  203.     kMailFromMask                = 1L << (kMailFromBit - 1),
  204.     kMailToMask                    = 1L << (kMailToBit - 1),
  205.     kMailCcMask                    = 1L << (kMailCcBit - 1),
  206.     kMailBccMask                = 1L << (kMailBccBit - 1)
  207. };
  208.  
  209. typedef unsigned long                     MailAttributeBitmap;
  210. /**************************************************************************************/
  211. typedef unsigned short                     MailLetterSystemFlags;
  212. /* Values of MailLetterSystemFlags */
  213. /* letter is available locally (either by nature or via cache) */
  214.  
  215. enum {
  216.     kMailIsLocalBit                = 2
  217. };
  218.  
  219.  
  220. enum {
  221.     kMailIsLocalMask            = 1L << kMailIsLocalBit
  222. };
  223.  
  224. typedef unsigned short                     MailLetterUserFlags;
  225.  
  226. enum {
  227.     kMailReadBit                = 0,                            /* this letter has been opened */
  228.     kMailDontArchiveBit            = 1,                            /* this letter is not to be archived either because it has already been archived or it should not be archived. */
  229.     kMailInTrashBit                = 2                                /* this letter is in trash */
  230. };
  231.  
  232. /* Values of MailLetterUserFlags */
  233.  
  234. enum {
  235.     kMailReadMask                = 1L << kMailReadBit,
  236.     kMailDontArchiveMask        = 1L << kMailDontArchiveBit,
  237.     kMailInTrashMask            = 1L << kMailInTrashBit
  238. };
  239.  
  240.  
  241. struct MailLetterFlags {
  242.     MailLetterSystemFlags             sysFlags;
  243.     MailLetterUserFlags             userFlags;
  244. };
  245. typedef struct MailLetterFlags            MailLetterFlags;
  246.  
  247. struct MailMaskedLetterFlags {
  248.     MailLetterFlags                 flagMask;                    /* flags that are to be set */
  249.     MailLetterFlags                 flagValues;                    /* and their values */
  250. };
  251. typedef struct MailMaskedLetterFlags    MailMaskedLetterFlags;
  252.  
  253. enum {
  254.     kMailOriginalInReportBit    = 1,
  255.     kMailNonReceiptReportsBit    = 3,
  256.     kMailReceiptReportsBit        = 4,
  257.     kMailForwardedBit            = 5,
  258.     kMailPriorityBit            = 6,
  259.     kMailIsReportWithOriginalBit = 8,
  260.     kMailIsReportBit            = 9,
  261.     kMailHasContentBit            = 10,
  262.     kMailHasSignatureBit        = 11,
  263.     kMailAuthenticatedBit        = 12,
  264.     kMailSentBit                = 13,
  265.     kMailNativeContentBit        = 14,
  266.     kMailImageContentBit        = 15,
  267.     kMailStandardContentBit        = 16
  268. };
  269.  
  270. /* Values of MailIndications */
  271.  
  272. enum {
  273.     kMailStandardContentMask    = 1L << (kMailStandardContentBit - 1),
  274.     kMailImageContentMask        = 1L << (kMailImageContentBit - 1),
  275.     kMailNativeContentMask        = 1L << (kMailNativeContentBit - 1),
  276.     kMailSentMask                = 1L << (kMailSentBit - 1),
  277.     kMailAuthenticatedMask        = 1L << (kMailAuthenticatedBit - 1),
  278.     kMailHasSignatureMask        = 1L << (kMailHasSignatureBit - 1),
  279.     kMailHasContentMask            = 1L << (kMailHasContentBit - 1),
  280.     kMailIsReportMask            = 1L << (kMailIsReportBit - 1),
  281.     kMailIsReportWithOriginalMask = 1L << (kMailIsReportWithOriginalBit - 1),
  282.     kMailPriorityMask            = 3L << (kMailPriorityBit - 1),
  283.     kMailForwardedMask            = 1L << (kMailForwardedBit - 1),
  284.     kMailReceiptReportsMask        = 1L << (kMailReceiptReportsBit - 1),
  285.     kMailNonReceiptReportsMask    = 1L << (kMailNonReceiptReportsBit - 1),
  286.     kMailOriginalInReportMask    = 3L << (kMailOriginalInReportBit - 1)
  287. };
  288.  
  289.  
  290. typedef unsigned long                     MailIndications;
  291. /* values of the field originalInReport in MailIndications */
  292.  
  293. enum {
  294.     kMailNoOriginal                = 0,                            /* do not enclose original in reports */
  295.     kMailEncloseOnNonReceipt    = 3                                /* enclose original in non-delivery reports */
  296. };
  297.  
  298. typedef IPMMsgID                         MailLetterID;
  299.  
  300. struct MailTime {
  301.     UTCTime                         time;                        /* current UTC(GMT) time */
  302.     UTCOffset                         offset;                        /* offset from GMT */
  303. };
  304. typedef struct MailTime                    MailTime;
  305. /* innermost letter has nestingLevel 0 */
  306.  
  307. typedef unsigned short                     MailNestingLevel;
  308. typedef OCERecipient                     MailRecipient;
  309. /**************************************************************************************/
  310.  
  311. enum {
  312.     kMailTextSegmentBit            = 0,
  313.     kMailPictSegmentBit            = 1,
  314.     kMailSoundSegmentBit        = 2,
  315.     kMailStyledTextSegmentBit    = 3,
  316.     kMailMovieSegmentBit        = 4
  317. };
  318.  
  319. typedef unsigned short                     MailSegmentMask;
  320. /* Values of MailSegmentMask */
  321.  
  322. enum {
  323.     kMailTextSegmentMask        = 1L << kMailTextSegmentBit,
  324.     kMailPictSegmentMask        = 1L << kMailPictSegmentBit,
  325.     kMailSoundSegmentMask        = 1L << kMailSoundSegmentBit,
  326.     kMailStyledTextSegmentMask    = 1L << kMailStyledTextSegmentBit,
  327.     kMailMovieSegmentMask        = 1L << kMailMovieSegmentBit
  328. };
  329.  
  330. typedef unsigned short                     MailSegmentType;
  331. /* Values of MailSegmentType */
  332.  
  333. enum {
  334.     kMailInvalidSegmentType        = 0,
  335.     kMailTextSegmentType        = 1,
  336.     kMailPictSegmentType        = 2,
  337.     kMailSoundSegmentType        = 3,
  338.     kMailStyledTextSegmentType    = 4,
  339.     kMailMovieSegmentType        = 5
  340. };
  341.  
  342. /**************************************************************************************/
  343.  
  344. enum {
  345.     kMailErrorLogEntryVersion    = 0x0101,
  346.     kMailMSAMErrorStringListID    = 128,                            /* These 'STR#' resources should be */
  347.     kMailMSAMActionStringListID    = 129                            /* in the PMSAM resource fork */
  348. };
  349.  
  350. typedef unsigned short                     MailLogErrorType;
  351. /* Values of MailLogErrorType */
  352.  
  353. enum {
  354.     kMailELECorrectable            = 0,
  355.     kMailELEError                = 1,
  356.     kMailELEWarning                = 2,
  357.     kMailELEInformational        = 3
  358. };
  359.  
  360. typedef short                             MailLogErrorCode;
  361. /* Values of MailLogErrorCode */
  362.  
  363. enum {
  364.     kMailMSAMErrorCode            = 0,                            /* positive codes are indices into PMSAM defined strings */
  365.     kMailMiscError                = -1,                            /* negative codes are OCE defined */
  366.     kMailNoModem                = -2                            /* modem required, but missing */
  367. };
  368.  
  369.  
  370. struct MailErrorLogEntryInfo {
  371.     short                             version;
  372.     UTCTime                         timeOccurred;                /* do not fill in */
  373.     Str31                             reportingPMSAM;                /* do not fill in */
  374.     Str31                             reportingMSAMSlot;            /* do not fill in */
  375.     MailLogErrorType                 errorType;
  376.     MailLogErrorCode                 errorCode;
  377.  
  378.     short                             errorResource;                /* resources are valid if */
  379.     short                             actionResource;                /* errorCode = kMailMSAMErrorCode index starts from 1 */
  380.     unsigned long                     filler;
  381.     unsigned short                     filler2;
  382. };
  383. typedef struct MailErrorLogEntryInfo    MailErrorLogEntryInfo;
  384. /**************************************************************************************/
  385.  
  386. typedef short                             MailBlockMode;
  387. /* Values of MailBlockMode */
  388.  
  389. enum {
  390.     kMailFromStart                = 1,                            /* write data from offset calculated from */
  391.     kMailFromLEOB                = 2,                            /* start of block, end of block, */
  392.     kMailFromMark                = 3                                /* or from the current mark */
  393. };
  394.  
  395.  
  396. struct MailEnclosureInfo {
  397.     StringPtr                         enclosureName;
  398.     CInfoPBPtr                         catInfo;
  399.     StringPtr                         comment;
  400.     void *                            icon;
  401. };
  402. typedef struct MailEnclosureInfo        MailEnclosureInfo;
  403. /**************************************************************************************/
  404.  
  405. enum {
  406.     kOCESetupLocationNone        = 0,                            /* disconnect state */
  407.     kOCESetupLocationMax        = 8                                /* maximum location value */
  408. };
  409.  
  410.  
  411. typedef char                             OCESetupLocation;
  412. /* location state is a bitmask, 0x1=>1st location active, 
  413.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  414.  */
  415. #define MailLocationMask(locationNumber) (1<<((locationNumber)-1))
  416. typedef UInt8                             MailLocationFlags;
  417.  
  418. struct MailLocationInfo {
  419.     OCESetupLocation                 location;
  420.     MailLocationFlags                 active;
  421. };
  422. typedef struct MailLocationInfo            MailLocationInfo;
  423. /**************************************************************************************/
  424. /* Definitions for Personal MSAMs */
  425. /**************************************************************************************/
  426.  
  427. enum {
  428.     kMailEPPCMsgVersion            = 3
  429. };
  430.  
  431.  
  432. struct MailEPPCMsg {
  433.     short                             version;
  434.     union {
  435.         SMCA *                            theSMCA;                /* for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn' */
  436.         long                             sequenceNumber;            /* for 'inqu', 'dlom' */
  437.         MailLocationInfo                 locationInfo;            /* for 'locc' */
  438.     }                                 u;
  439. };
  440. typedef struct MailEPPCMsg                MailEPPCMsg;
  441. /* Values of OCE defined High Level Event message classes */
  442.  
  443. enum {
  444.     kMailEPPCCreateSlot            = FOUR_CHAR_CODE('crsl'),
  445.     kMailEPPCModifySlot            = FOUR_CHAR_CODE('mdsl'),
  446.     kMailEPPCDeleteSlot            = FOUR_CHAR_CODE('dlsl'),
  447.     kMailEPPCShutDown            = FOUR_CHAR_CODE('quit'),
  448.     kMailEPPCMailboxOpened        = FOUR_CHAR_CODE('mbop'),
  449.     kMailEPPCMailboxClosed        = FOUR_CHAR_CODE('mbcl'),
  450.     kMailEPPCMsgPending            = FOUR_CHAR_CODE('msgp'),
  451.     kMailEPPCSendImmediate        = FOUR_CHAR_CODE('sndi'),
  452.     kMailEPPCContinue            = FOUR_CHAR_CODE('cont'),
  453.     kMailEPPCSchedule            = FOUR_CHAR_CODE('sked'),
  454.     kMailEPPCAdmin                = FOUR_CHAR_CODE('admn'),
  455.     kMailEPPCInQUpdate            = FOUR_CHAR_CODE('inqu'),
  456.     kMailEPPCMsgOpened            = FOUR_CHAR_CODE('msgo'),
  457.     kMailEPPCDeleteOutQMsg        = FOUR_CHAR_CODE('dlom'),
  458.     kMailEPPCWakeup                = FOUR_CHAR_CODE('wkup'),
  459.     kMailEPPCLocationChanged    = FOUR_CHAR_CODE('locc')
  460. };
  461.  
  462.  
  463. union MailTimer {
  464.     long                             frequency;                    /* how often to connect */
  465.     long                             connectTime;                /* time since midnight */
  466. };
  467. typedef union MailTimer                    MailTimer;
  468.  
  469. enum {
  470.     kMailTimerOff                = 0,                            /* control is off */
  471.     kMailTimerTime                = 1,                            /* specifies connect time (relative to midnight) */
  472.     kMailTimerFrequency            = 2                                /* specifies connect frequency */
  473. };
  474.  
  475. typedef Byte                             MailTimerKind;
  476.  
  477. struct MailTimers {
  478.     MailTimerKind                     sendTimeKind;                /* either kMailTimerTime or kMailTimerFrequency */
  479.     MailTimerKind                     receiveTimeKind;            /* either kMailTimerTime or kMailTimerFrequency */
  480.     MailTimer                         send;
  481.     MailTimer                         receive;
  482. };
  483. typedef struct MailTimers                MailTimers;
  484.  
  485.  
  486. struct MailStandardSlotInfoAttribute {
  487.     short                             version;
  488.     MailLocationFlags                 active;                        /* active if MailLocationMask(i) is set */
  489.     Byte                             padByte;
  490.     MailTimers                         sendReceiveTimer;
  491. };
  492. typedef struct MailStandardSlotInfoAttribute MailStandardSlotInfoAttribute;
  493. typedef union MSAMParam TempMSAMParam;
  494. typedef CALLBACK_API( void , MSAMIOCompletionProcPtr )(TempMSAMParam *paramBlock);
  495. /*
  496.     WARNING: MSAMIOCompletionProcPtr uses register based parameters under classic 68k
  497.              and cannot be written in a high-level language without 
  498.              the help of mixed mode or assembly glue.
  499. */
  500. typedef REGISTER_UPP_TYPE(MSAMIOCompletionProcPtr)                 MSAMIOCompletionUPP;
  501.  
  502. struct PMSAMGetMSAMRecordPB {
  503.     void *                            qLink;
  504.     long                             reservedH1;
  505.     long                             reservedH2;
  506.     MSAMIOCompletionUPP             ioCompletion;
  507.     OSErr                             ioResult;
  508.     long                             saveA5;
  509.     short                             reqCode;
  510.     CreationID                         msamCID;
  511. };
  512. typedef struct PMSAMGetMSAMRecordPB        PMSAMGetMSAMRecordPB;
  513.  
  514. struct PMSAMOpenQueuesPB {
  515.     void *                            qLink;
  516.     long                             reservedH1;
  517.     long                             reservedH2;
  518.     MSAMIOCompletionUPP             ioCompletion;
  519.     OSErr                             ioResult;
  520.     long                             saveA5;
  521.     short                             reqCode;
  522.     MSAMQueueRef                     inQueueRef;
  523.     MSAMQueueRef                     outQueueRef;
  524.     MSAMSlotID                         msamSlotID;
  525.     long                             filler[2];
  526. };
  527. typedef struct PMSAMOpenQueuesPB        PMSAMOpenQueuesPB;
  528.  
  529. typedef unsigned short                     PMSAMStatus;
  530. /* Values of PMSAMStatus */
  531.  
  532. enum {
  533.     kPMSAMStatusPending            = 1,                            /* for inQueue and outQueue */
  534.     kPMSAMStatusError            = 2,                            /* for inQueue and outQueue */
  535.     kPMSAMStatusSending            = 3,                            /* for outQueue only */
  536.     kPMSAMStatusCaching            = 4,                            /* for inQueue only */
  537.     kPMSAMStatusSent            = 5                                /* for outQueue only */
  538. };
  539.  
  540.  
  541. struct PMSAMSetStatusPB {
  542.     void *                            qLink;
  543.     long                             reservedH1;
  544.     long                             reservedH2;
  545.     MSAMIOCompletionUPP             ioCompletion;
  546.     OSErr                             ioResult;
  547.     long                             saveA5;
  548.     short                             reqCode;
  549.     MSAMQueueRef                     queueRef;
  550.     long                             seqNum;
  551.     long                             msgHint;                    /* for posting cache error,set this to 0 when report outq status */
  552.     PMSAMStatus                     status;
  553. };
  554. typedef struct PMSAMSetStatusPB            PMSAMSetStatusPB;
  555.  
  556. struct PMSAMLogErrorPB {
  557.     void *                            qLink;
  558.     long                             reservedH1;
  559.     long                             reservedH2;
  560.     MSAMIOCompletionUPP             ioCompletion;
  561.     OSErr                             ioResult;
  562.     long                             saveA5;
  563.     short                             reqCode;
  564.     MSAMSlotID                         msamSlotID;                    /* 0 for PMSAM errors */
  565.     MailErrorLogEntryInfo *            logEntry;
  566.     long                             filler[2];
  567. };
  568. typedef struct PMSAMLogErrorPB            PMSAMLogErrorPB;
  569. /****************************************************************************************/
  570.  
  571. enum {
  572.     kMailMsgSummaryVersion        = 1
  573. };
  574.  
  575.  
  576. struct MailMasterData {
  577.     MailAttributeBitmap             attrMask;                    /* indicates attributes present in MsgSummary */
  578.     MailLetterID                     messageID;
  579.     MailLetterID                     replyID;
  580.     MailLetterID                     conversationID;
  581. };
  582. typedef struct MailMasterData            MailMasterData;
  583. /* Values for addressedToMe in struct MailCoreData */
  584.  
  585. enum {
  586.     kAddressedAs_TO                = 0x01,
  587.     kAddressedAs_CC                = 0x02,
  588.     kAddressedAs_BCC            = 0x04
  589. };
  590.  
  591.  
  592. struct MailCoreData {
  593.     MailLetterFlags                 letterFlags;
  594.     unsigned long                     messageSize;
  595.     MailIndications                 letterIndications;
  596.     OCECreatorType                     messageType;
  597.     MailTime                         sendTime;
  598.     OSType                             messageFamily;
  599.     unsigned char                     reserved;
  600.     unsigned char                     addressedToMe;
  601.     char                             agentInfo[6];                /* 6 bytes of special info [set to zero] */
  602.                                                                 /* these are variable length and even padded */
  603.     RString32                         sender;                        /* recipient's entityName (trunc)*/
  604.     RString32                         subject;                    /* subject maybe truncated */
  605. };
  606. typedef struct MailCoreData                MailCoreData;
  607.  
  608. struct MSAMMsgSummary {
  609.     short                             version;                    /* following flags are defaulted by Toolbox */
  610.     Boolean                         msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  611.     Boolean                         msgUpdated;                    /* true if msgSummary was updated by MailManager */
  612.     Boolean                         msgCached;                    /* true if msg is in the slot's InQueue */
  613.     Byte                             padByte;
  614.  
  615.     MailMasterData                     masterData;
  616.     MailCoreData                     coreData;
  617. };
  618. typedef struct MSAMMsgSummary            MSAMMsgSummary;
  619. /* PMSAM can put up to 128 bytes of private msg summary data */
  620.  
  621. enum {
  622.     kMailMaxPMSAMMsgSummaryData    = 128
  623. };
  624.  
  625.  
  626. struct PMSAMCreateMsgSummaryPB {
  627.     void *                            qLink;
  628.     long                             reservedH1;
  629.     long                             reservedH2;
  630.     MSAMIOCompletionUPP             ioCompletion;
  631.     OSErr                             ioResult;
  632.     long                             saveA5;
  633.     short                             reqCode;
  634.     MSAMQueueRef                     inQueueRef;
  635.     long                             seqNum;                        /* <- seq of the new message */
  636.     MSAMMsgSummary *                msgSummary;                    /* attributes and mask filled in */
  637.     MailBuffer *                    buffer;                        /* PMSAM specific data to be appended */
  638. };
  639. typedef struct PMSAMCreateMsgSummaryPB    PMSAMCreateMsgSummaryPB;
  640.  
  641.  
  642. struct PMSAMPutMsgSummaryPB {
  643.     void *                            qLink;
  644.     long                             reservedH1;
  645.     long                             reservedH2;
  646.     MSAMIOCompletionUPP             ioCompletion;
  647.     OSErr                             ioResult;
  648.     long                             saveA5;
  649.     short                             reqCode;
  650.     MSAMQueueRef                     inQueueRef;
  651.     long                             seqNum;
  652.     MailMaskedLetterFlags *            letterFlags;                /* if not nil, then set msgStoreFlags */
  653.     MailBuffer *                    buffer;                        /* PMSAM specific data to be overwritten */
  654. };
  655. typedef struct PMSAMPutMsgSummaryPB        PMSAMPutMsgSummaryPB;
  656.  
  657. struct PMSAMGetMsgSummaryPB {
  658.     void *                            qLink;
  659.     long                             reservedH1;
  660.     long                             reservedH2;
  661.     MSAMIOCompletionUPP             ioCompletion;
  662.     OSErr                             ioResult;
  663.     long                             saveA5;
  664.     short                             reqCode;
  665.     MSAMQueueRef                     inQueueRef;
  666.     long                             seqNum;
  667.     MSAMMsgSummary *                msgSummary;                    /* if not nil, then read in the msgSummary */
  668.     MailBuffer *                    buffer;                        /* PMSAM specific data to be read */
  669.     unsigned short                     msgSummaryOffset;            /* offset of PMSAM specific data from start of MsgSummary */
  670. };
  671. typedef struct PMSAMGetMsgSummaryPB        PMSAMGetMsgSummaryPB;
  672. /****************************************************************************************/
  673. /* Definitions for Server MSAMs */
  674. /**************************************************************************************/
  675.  
  676. typedef unsigned short                     SMSAMAdminCode;
  677. /* Values of SMSAMAdminCode */
  678.  
  679. enum {
  680.     kSMSAMNotifyFwdrSetupChange    = 1,
  681.     kSMSAMNotifyFwdrNameChange    = 2,
  682.     kSMSAMNotifyFwdrPwdChange    = 3,
  683.     kSMSAMGetDynamicFwdrParams    = 4
  684. };
  685.  
  686. typedef unsigned long                     SMSAMSlotChanges;
  687.  
  688. enum {
  689.     kSMSAMFwdrHomeInternetChangedBit = 0,
  690.     kSMSAMFwdrConnectedToChangedBit = 1,
  691.     kSMSAMFwdrForeignRLIsChangedBit = 2,
  692.     kSMSAMFwdrMnMServerChangedBit = 3
  693. };
  694.  
  695. /* Values of SMSAMSlotChanges */
  696.  
  697. enum {
  698.     kSMSAMFwdrEverythingChangedMask = -1,
  699.     kSMSAMFwdrHomeInternetChangedMask = 1L << kSMSAMFwdrHomeInternetChangedBit,
  700.     kSMSAMFwdrConnectedToChangedMask = 1L << kSMSAMFwdrConnectedToChangedBit,
  701.     kSMSAMFwdrForeignRLIsChangedMask = 1L << kSMSAMFwdrForeignRLIsChangedBit,
  702.     kSMSAMFwdrMnMServerChangedMask = 1L << kSMSAMFwdrMnMServerChangedBit
  703. };
  704.  
  705. /* kSMSAMNotifyFwdrSetupChange */
  706.  
  707. struct SMSAMSetupChange {
  708.     SMSAMSlotChanges                 whatChanged;                /*  --> bitmap of what parameters changed */
  709.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  710. };
  711. typedef struct SMSAMSetupChange            SMSAMSetupChange;
  712. /* kSMSAMNotifyFwdrNameChange */
  713.  
  714. struct SMSAMNameChange {
  715.     RString                         newName;                    /*  --> msams new name */
  716.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  717. };
  718. typedef struct SMSAMNameChange            SMSAMNameChange;
  719. /* kSMSAMNotifyFwdrPasswordChange */
  720.  
  721. struct SMSAMPasswordChange {
  722.     RString                         newPassword;                /*  --> msams new password */
  723.     AddrBlock                         serverHint;                    /*  --> try this ADAP server first */
  724. };
  725. typedef struct SMSAMPasswordChange        SMSAMPasswordChange;
  726. /* kSMSAMGetDynamicFwdrParams */
  727.  
  728. struct SMSAMDynamicParams {
  729.     unsigned long                     curDiskUsed;                /* <--  amount of disk space used by msam */
  730.     unsigned long                     curMemoryUsed;                /* <--  amount of memory used by msam */
  731. };
  732. typedef struct SMSAMDynamicParams        SMSAMDynamicParams;
  733.  
  734. struct SMSAMAdminEPPCRequest {
  735.     SMSAMAdminCode                     adminCode;
  736.     union {
  737.         SMSAMSetupChange                 setupChange;
  738.         SMSAMNameChange                 nameChange;
  739.         SMSAMPasswordChange             passwordChange;
  740.         SMSAMDynamicParams                 dynamicParams;
  741.     }                                 u;
  742. };
  743. typedef struct SMSAMAdminEPPCRequest    SMSAMAdminEPPCRequest;
  744.  
  745. struct SMSAMSetupPB {
  746.     void *                            qLink;
  747.     long                             reservedH1;
  748.     long                             reservedH2;
  749.     MSAMIOCompletionUPP             ioCompletion;
  750.     OSErr                             ioResult;
  751.     long                             saveA5;
  752.     short                             reqCode;
  753.     RecordIDPtr                     serverMSAM;
  754.     RStringPtr                         password;
  755.     OSType                             gatewayType;
  756.     RStringPtr                         gatewayTypeDescription;
  757.     AddrBlock                         catalogServerHint;
  758. };
  759. typedef struct SMSAMSetupPB                SMSAMSetupPB;
  760.  
  761. struct SMSAMStartupPB {
  762.     void *                            qLink;
  763.     long                             reservedH1;
  764.     long                             reservedH2;
  765.     MSAMIOCompletionUPP             ioCompletion;
  766.     OSErr                             ioResult;
  767.     long                             saveA5;
  768.     short                             reqCode;
  769.     AuthIdentity                     msamIdentity;
  770.     MSAMQueueRef                     queueRef;
  771. };
  772. typedef struct SMSAMStartupPB            SMSAMStartupPB;
  773.  
  774. struct SMSAMShutdownPB {
  775.     void *                            qLink;
  776.     long                             reservedH1;
  777.     long                             reservedH2;
  778.     MSAMIOCompletionUPP             ioCompletion;
  779.     OSErr                             ioResult;
  780.     long                             saveA5;
  781.     short                             reqCode;
  782.     MSAMQueueRef                     queueRef;
  783. };
  784. typedef struct SMSAMShutdownPB            SMSAMShutdownPB;
  785. /****************************************************************************************/
  786. /* Definitions for reading and writing MSAM Letters */
  787. /****************************************************************************************/
  788.  
  789. struct MSAMEnumeratePB {
  790.     void *                            qLink;
  791.     long                             reservedH1;
  792.     long                             reservedH2;
  793.     MSAMIOCompletionUPP             ioCompletion;
  794.     OSErr                             ioResult;
  795.     long                             saveA5;
  796.     short                             reqCode;
  797.     MSAMQueueRef                     queueRef;
  798.     long                             startSeqNum;
  799.     long                             nextSeqNum;
  800.                                                                 /* buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue */
  801.     MailBuffer                         buffer;
  802. };
  803. typedef struct MSAMEnumeratePB            MSAMEnumeratePB;
  804.  
  805. struct MSAMEnumerateInQReply {
  806.     long                             seqNum;
  807.     Boolean                         msgDeleted;                    /* true if msg is to be deleted by PMSAM */
  808.     Boolean                         msgUpdated;                    /* true if MsgSummary has been updated by TB */
  809.     Boolean                         msgCached;                    /* true if msg is in the incoming queue */
  810.     Byte                             padByte;
  811. };
  812. typedef struct MSAMEnumerateInQReply    MSAMEnumerateInQReply;
  813.  
  814. struct MSAMEnumerateOutQReply {
  815.     long                             seqNum;
  816.     Boolean                         done;                        /* true if all responsible recipients have been processed */
  817.     IPMPriority                     priority;
  818.     OSType                             msgFamily;
  819.     long                             approxSize;
  820.     Boolean                         tunnelForm;                    /* true if this letter has to be tunnelled */
  821.     Byte                             padByte;
  822.     NetworkSpec                     nextHop;                    /* valid if tunnelForm is true */
  823.     OCECreatorType                     msgType;
  824. };
  825. typedef struct MSAMEnumerateOutQReply    MSAMEnumerateOutQReply;
  826.  
  827. struct MSAMDeletePB {
  828.     void *                            qLink;
  829.     long                             reservedH1;
  830.     long                             reservedH2;
  831.     MSAMIOCompletionUPP             ioCompletion;
  832.     OSErr                             ioResult;
  833.     long                             saveA5;
  834.     short                             reqCode;
  835.     MSAMQueueRef                     queueRef;
  836.     long                             seqNum;
  837.     Boolean                         msgOnly;                    /* only valid for PMSAM & inQueue */
  838.                                                                 /* set true to delete message but not msgSummary */
  839.     Byte                             padByte;
  840.                                                                 /* only valid for SMSAM & tunnelled messages */
  841.     OSErr                             result;
  842. };
  843. typedef struct MSAMDeletePB                MSAMDeletePB;
  844.  
  845. struct MSAMOpenPB {
  846.     void *                            qLink;
  847.     long                             reservedH1;
  848.     long                             reservedH2;
  849.     MSAMIOCompletionUPP             ioCompletion;
  850.     OSErr                             ioResult;
  851.     long                             saveA5;
  852.     short                             reqCode;
  853.     MSAMQueueRef                     queueRef;
  854.     long                             seqNum;
  855.     MailMsgRef                         mailMsgRef;
  856. };
  857. typedef struct MSAMOpenPB                MSAMOpenPB;
  858.  
  859. struct MSAMOpenNestedPB {
  860.     void *                            qLink;
  861.     long                             reservedH1;
  862.     long                             reservedH2;
  863.     MSAMIOCompletionUPP             ioCompletion;
  864.     OSErr                             ioResult;
  865.     long                             saveA5;
  866.     short                             reqCode;
  867.     MailMsgRef                         mailMsgRef;
  868.     MailMsgRef                         nestedRef;
  869. };
  870. typedef struct MSAMOpenNestedPB            MSAMOpenNestedPB;
  871.  
  872. struct MSAMClosePB {
  873.     void *                            qLink;
  874.     long                             reservedH1;
  875.     long                             reservedH2;
  876.     MSAMIOCompletionUPP             ioCompletion;
  877.     OSErr                             ioResult;
  878.     long                             saveA5;
  879.     short                             reqCode;
  880.     MailMsgRef                         mailMsgRef;
  881. };
  882. typedef struct MSAMClosePB                MSAMClosePB;
  883.  
  884. struct MSAMGetMsgHeaderPB {
  885.     void *                            qLink;
  886.     long                             reservedH1;
  887.     long                             reservedH2;
  888.     MSAMIOCompletionUPP             ioCompletion;
  889.     OSErr                             ioResult;
  890.     long                             saveA5;
  891.     short                             reqCode;
  892.     MailMsgRef                         mailMsgRef;
  893.     IPMHeaderSelector                 selector;
  894.     Boolean                         filler1;
  895.     unsigned long                     offset;
  896.     MailBuffer                         buffer;
  897.     unsigned long                     remaining;
  898. };
  899. typedef struct MSAMGetMsgHeaderPB        MSAMGetMsgHeaderPB;
  900. /*    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  901.     the attributes indicated in responseMask, 
  902.     from the attribute indicated by the least significant bit set
  903.     to the attribute indicated by the most significant bit set.
  904.     Note that recipients - from, to, cc, bcc cannot be read using
  905.     this call. Use GetRecipients to read these. 
  906. */
  907.  
  908. struct MSAMGetAttributesPB {
  909.     void *                            qLink;
  910.     long                             reservedH1;
  911.     long                             reservedH2;
  912.     MSAMIOCompletionUPP             ioCompletion;
  913.     OSErr                             ioResult;
  914.     long                             saveA5;
  915.     short                             reqCode;
  916.     MailMsgRef                         mailMsgRef;
  917.     MailAttributeBitmap             requestMask;                /* kMailIndicationsBit thru kMailSubjectBit */
  918.     MailBuffer                         buffer;
  919.     MailAttributeBitmap             responseMask;
  920.     Boolean                         more;
  921.     Boolean                         filler1;
  922. };
  923. typedef struct MSAMGetAttributesPB        MSAMGetAttributesPB;
  924. /* attrID value to get resolved recipient list */
  925.  
  926. enum {
  927.     kMailResolvedList            = 0
  928. };
  929.  
  930.  
  931. struct MailOriginalRecipient {
  932.     short                             index;
  933. };
  934. typedef struct MailOriginalRecipient    MailOriginalRecipient;
  935. /* Followed by OCEPackedRecipient */
  936.  
  937.  
  938.  
  939. struct MailResolvedRecipient {
  940.     short                             index;
  941.     short                             recipientFlags;
  942.     Boolean                         responsible;
  943.     Byte                             padByte;
  944. };
  945. typedef struct MailResolvedRecipient    MailResolvedRecipient;
  946. /* Followed by OCEPackedRecipient */
  947.  
  948.  
  949. /*     MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  950.     MailOriginalRecipient if getting original recipients 
  951.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  952.     MailResolvedRecipient if getting resolved reicpients
  953.                             ie the attrID is kMailResolvedList
  954.     Both tuples are word alligned.  
  955. */
  956.  
  957. struct MSAMGetRecipientsPB {
  958.     void *                            qLink;
  959.     long                             reservedH1;
  960.     long                             reservedH2;
  961.     MSAMIOCompletionUPP             ioCompletion;
  962.     OSErr                             ioResult;
  963.     long                             saveA5;
  964.     short                             reqCode;
  965.     MailMsgRef                         mailMsgRef;
  966.     MailAttributeID                 attrID;                        /* kMailFromBit thru kMailBccBit */
  967.     unsigned short                     startIndex;                    /* starts at 1 */
  968.     MailBuffer                         buffer;
  969.     unsigned short                     nextIndex;
  970.     Boolean                         more;
  971.     Boolean                         filler1;
  972. };
  973. typedef struct MSAMGetRecipientsPB        MSAMGetRecipientsPB;
  974.  
  975. struct MSAMGetContentPB {
  976.     void *                            qLink;
  977.     long                             reservedH1;
  978.     long                             reservedH2;
  979.     MSAMIOCompletionUPP             ioCompletion;
  980.     OSErr                             ioResult;
  981.     long                             saveA5;
  982.     short                             reqCode;
  983.     MailMsgRef                         mailMsgRef;
  984.     MailSegmentMask                 segmentMask;
  985.     MailBuffer                         buffer;
  986.     StScrpRec *                        textScrap;
  987.     ScriptCode                         script;
  988.     MailSegmentType                 segmentType;
  989.     Boolean                         endOfScript;
  990.     Boolean                         endOfSegment;
  991.     Boolean                         endOfContent;
  992.     Boolean                         filler1;
  993.     long                             segmentLength;                /* NEW: <-  valid first call in a segment */
  994.     long                             segmentID;                    /* NEW: <-> identifier for this segment */
  995. };
  996. typedef struct MSAMGetContentPB            MSAMGetContentPB;
  997.  
  998. struct MSAMGetEnclosurePB {
  999.     void *                            qLink;
  1000.     long                             reservedH1;
  1001.     long                             reservedH2;
  1002.     MSAMIOCompletionUPP             ioCompletion;
  1003.     OSErr                             ioResult;
  1004.     long                             saveA5;
  1005.     short                             reqCode;
  1006.     MailMsgRef                         mailMsgRef;
  1007.     Boolean                         contentEnclosure;
  1008.     Byte                             padByte;
  1009.     MailBuffer                         buffer;
  1010.     Boolean                         endOfFile;
  1011.     Boolean                         endOfEnclosures;
  1012. };
  1013. typedef struct MSAMGetEnclosurePB        MSAMGetEnclosurePB;
  1014.  
  1015. struct MailBlockInfo {
  1016.     OCECreatorType                     blockType;
  1017.     unsigned long                     offset;
  1018.     unsigned long                     blockLength;
  1019. };
  1020. typedef struct MailBlockInfo            MailBlockInfo;
  1021.  
  1022. struct MSAMEnumerateBlocksPB {
  1023.     void *                            qLink;
  1024.     long                             reservedH1;
  1025.     long                             reservedH2;
  1026.     MSAMIOCompletionUPP             ioCompletion;
  1027.     OSErr                             ioResult;
  1028.     long                             saveA5;
  1029.     short                             reqCode;
  1030.     MailMsgRef                         mailMsgRef;
  1031.     unsigned short                     startIndex;                    /* starts at 1 */
  1032.     MailBuffer                         buffer;
  1033.                                                                 /*     buffer contains a Mail Reply. Each tuple is a MailBlockInfo */
  1034.     unsigned short                     nextIndex;
  1035.     Boolean                         more;
  1036.     Boolean                         filler1;
  1037. };
  1038. typedef struct MSAMEnumerateBlocksPB    MSAMEnumerateBlocksPB;
  1039.  
  1040. struct MSAMGetBlockPB {
  1041.     void *                            qLink;
  1042.     long                             reservedH1;
  1043.     long                             reservedH2;
  1044.     MSAMIOCompletionUPP             ioCompletion;
  1045.     OSErr                             ioResult;
  1046.     long                             saveA5;
  1047.     short                             reqCode;
  1048.     MailMsgRef                         mailMsgRef;
  1049.     OCECreatorType                     blockType;
  1050.     unsigned short                     blockIndex;
  1051.     MailBuffer                         buffer;
  1052.     unsigned long                     dataOffset;
  1053.     Boolean                         endOfBlock;
  1054.     Byte                             padByte;
  1055.     unsigned long                     remaining;
  1056. };
  1057. typedef struct MSAMGetBlockPB            MSAMGetBlockPB;
  1058. /* YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1059.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1060.  * REASONS.
  1061. */
  1062. /* not valid for tunnel form letters */
  1063.  
  1064. struct MSAMMarkRecipientsPB {
  1065.     void *                            qLink;
  1066.     long                             reservedH1;
  1067.     long                             reservedH2;
  1068.     MSAMIOCompletionUPP             ioCompletion;
  1069.     OSErr                             ioResult;
  1070.     long                             saveA5;
  1071.     short                             reqCode;
  1072.     MSAMQueueRef                     queueRef;
  1073.     long                             seqNum;
  1074.     MailBuffer                         buffer;                        /*     buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  1075.  
  1076. };
  1077. typedef struct MSAMMarkRecipientsPB        MSAMMarkRecipientsPB;
  1078. /* 
  1079.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1080.  * queueRef, seqNum 
  1081. */
  1082. /* not valid for tunnel form letters */
  1083.  
  1084. struct MSAMnMarkRecipientsPB {
  1085.     void *                            qLink;
  1086.     long                             reservedH1;
  1087.     long                             reservedH2;
  1088.     MSAMIOCompletionUPP             ioCompletion;
  1089.     OSErr                             ioResult;
  1090.     long                             saveA5;
  1091.     short                             reqCode;
  1092.     MailMsgRef                         mailMsgRef;
  1093.     MailBuffer                         buffer;                        /*     buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked. */
  1094.  
  1095. };
  1096. typedef struct MSAMnMarkRecipientsPB    MSAMnMarkRecipientsPB;
  1097. /****************************************************************************************/
  1098.  
  1099. struct MSAMCreatePB {
  1100.     void *                            qLink;
  1101.     long                             reservedH1;
  1102.     long                             reservedH2;
  1103.     MSAMIOCompletionUPP             ioCompletion;
  1104.     OSErr                             ioResult;
  1105.     long                             saveA5;
  1106.     short                             reqCode;
  1107.     MSAMQueueRef                     queueRef;
  1108.     Boolean                         asLetter;                    /* indicate if we should create as letter or msg */
  1109.     Boolean                         filler1;
  1110.     IPMMsgType                         msgType;                    /* up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true */
  1111.     long                             refCon;                        /* for messages only */
  1112.     long                             seqNum;                        /* set if creating message in the inQueue */
  1113.     Boolean                         tunnelForm;                    /* if true tunnelForm else newForm */
  1114.     Boolean                         bccRecipients;                /* true if creating letter with bcc recipients */
  1115.     MailMsgRef                         newRef;
  1116. };
  1117. typedef struct MSAMCreatePB                MSAMCreatePB;
  1118.  
  1119. struct MSAMBeginNestedPB {
  1120.     void *                            qLink;
  1121.     long                             reservedH1;
  1122.     long                             reservedH2;
  1123.     MSAMIOCompletionUPP             ioCompletion;
  1124.     OSErr                             ioResult;
  1125.     long                             saveA5;
  1126.     short                             reqCode;
  1127.     MailMsgRef                         mailMsgRef;
  1128.     long                             refCon;                        /* for messages only */
  1129.     IPMMsgType                         msgType;
  1130. };
  1131. typedef struct MSAMBeginNestedPB        MSAMBeginNestedPB;
  1132.  
  1133. struct MSAMEndNestedPB {
  1134.     void *                            qLink;
  1135.     long                             reservedH1;
  1136.     long                             reservedH2;
  1137.     MSAMIOCompletionUPP             ioCompletion;
  1138.     OSErr                             ioResult;
  1139.     long                             saveA5;
  1140.     short                             reqCode;
  1141.     MailMsgRef                         mailMsgRef;
  1142. };
  1143. typedef struct MSAMEndNestedPB            MSAMEndNestedPB;
  1144.  
  1145. struct MSAMSubmitPB {
  1146.     void *                            qLink;
  1147.     long                             reservedH1;
  1148.     long                             reservedH2;
  1149.     MSAMIOCompletionUPP             ioCompletion;
  1150.     OSErr                             ioResult;
  1151.     long                             saveA5;
  1152.     short                             reqCode;
  1153.     MailMsgRef                         mailMsgRef;
  1154.     Boolean                         submitFlag;
  1155.     Byte                             padByte;
  1156.     MailLetterID                     msgID;
  1157. };
  1158. typedef struct MSAMSubmitPB                MSAMSubmitPB;
  1159.  
  1160. struct MSAMPutMsgHeaderPB {
  1161.     void *                            qLink;
  1162.     long                             reservedH1;
  1163.     long                             reservedH2;
  1164.     MSAMIOCompletionUPP             ioCompletion;
  1165.     OSErr                             ioResult;
  1166.     long                             saveA5;
  1167.     short                             reqCode;
  1168.     MailMsgRef                         mailMsgRef;
  1169.     OCERecipient *                    replyQueue;
  1170.     IPMSender *                        sender;
  1171.     IPMNotificationType             deliveryNotification;
  1172.     IPMPriority                     priority;
  1173. };
  1174. typedef struct MSAMPutMsgHeaderPB        MSAMPutMsgHeaderPB;
  1175.  
  1176. struct MSAMPutAttributePB {
  1177.     void *                            qLink;
  1178.     long                             reservedH1;
  1179.     long                             reservedH2;
  1180.     MSAMIOCompletionUPP             ioCompletion;
  1181.     OSErr                             ioResult;
  1182.     long                             saveA5;
  1183.     short                             reqCode;
  1184.     MailMsgRef                         mailMsgRef;
  1185.     MailAttributeID                 attrID;                        /* kMailIndicationsBit thru kMailSubjectBit */
  1186.     MailBuffer                         buffer;
  1187. };
  1188. typedef struct MSAMPutAttributePB        MSAMPutAttributePB;
  1189.  
  1190. struct MSAMPutRecipientPB {
  1191.     void *                            qLink;
  1192.     long                             reservedH1;
  1193.     long                             reservedH2;
  1194.     MSAMIOCompletionUPP             ioCompletion;
  1195.     OSErr                             ioResult;
  1196.     long                             saveA5;
  1197.     short                             reqCode;
  1198.     MailMsgRef                         mailMsgRef;
  1199.     MailAttributeID                 attrID;                        /* kMailFromBit thru kMailBccBit */
  1200.     MailRecipient *                    recipient;
  1201.     Boolean                         responsible;                /* valid for server and message msams only */
  1202.     Boolean                         filler1;
  1203. };
  1204. typedef struct MSAMPutRecipientPB        MSAMPutRecipientPB;
  1205.  
  1206. struct MSAMPutContentPB {
  1207.     void *                            qLink;
  1208.     long                             reservedH1;
  1209.     long                             reservedH2;
  1210.     MSAMIOCompletionUPP             ioCompletion;
  1211.     OSErr                             ioResult;
  1212.     long                             saveA5;
  1213.     short                             reqCode;
  1214.  
  1215.     MailMsgRef                         mailMsgRef;
  1216.     MailSegmentType                 segmentType;
  1217.     Boolean                         append;
  1218.     Byte                             padByte;
  1219.     MailBuffer                         buffer;
  1220.     StScrpRec *                        textScrap;
  1221.     Boolean                         startNewScript;
  1222.     Boolean                         filler1;
  1223.     ScriptCode                         script;                        /* valid only if startNewScript is true */
  1224. };
  1225. typedef struct MSAMPutContentPB            MSAMPutContentPB;
  1226.  
  1227. struct MSAMPutEnclosurePB {
  1228.     void *                            qLink;
  1229.     long                             reservedH1;
  1230.     long                             reservedH2;
  1231.     MSAMIOCompletionUPP             ioCompletion;
  1232.     OSErr                             ioResult;
  1233.     long                             saveA5;
  1234.     short                             reqCode;
  1235.     MailMsgRef                         mailMsgRef;
  1236.     Boolean                         contentEnclosure;
  1237.     Byte                             padByte;
  1238.     Boolean                         hfs;                        /* true => in file system, false => in memory */
  1239.  
  1240.     Boolean                         append;
  1241.     MailBuffer                         buffer;                        /* Unused if hfs == true */
  1242.     FSSpec                             enclosure;
  1243.     MailEnclosureInfo                 addlInfo;
  1244. };
  1245. typedef struct MSAMPutEnclosurePB        MSAMPutEnclosurePB;
  1246.  
  1247. struct MSAMPutBlockPB {
  1248.     void *                            qLink;
  1249.     long                             reservedH1;
  1250.     long                             reservedH2;
  1251.     MSAMIOCompletionUPP             ioCompletion;
  1252.     OSErr                             ioResult;
  1253.     long                             saveA5;
  1254.     short                             reqCode;
  1255.     MailMsgRef                         mailMsgRef;
  1256.     long                             refCon;                        /* for messages only */
  1257.     OCECreatorType                     blockType;
  1258.     Boolean                         append;
  1259.     Boolean                         filler1;
  1260.     MailBuffer                         buffer;
  1261.     MailBlockMode                     mode;                        /* if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark */
  1262.     unsigned long                     offset;
  1263. };
  1264. typedef struct MSAMPutBlockPB            MSAMPutBlockPB;
  1265. /****************************************************************************************/
  1266.  
  1267. struct MSAMCreateReportPB {
  1268.     void *                            qLink;
  1269.     long                             reservedH1;
  1270.     long                             reservedH2;
  1271.     MSAMIOCompletionUPP             ioCompletion;
  1272.     OSErr                             ioResult;
  1273.     long                             saveA5;
  1274.     short                             reqCode;
  1275.     MSAMQueueRef                     queueRef;                    /* to distinguish personal and server MSAMs */
  1276.     MailMsgRef                         mailMsgRef;
  1277.     MailLetterID                     msgID;                        /* kMailLetterIDBit of letter being reported upon */
  1278.     MailRecipient *                    sender;                        /* sender of the letter you are creating report on */
  1279. };
  1280. typedef struct MSAMCreateReportPB        MSAMCreateReportPB;
  1281.  
  1282. struct MSAMPutRecipientReportPB {
  1283.     void *                            qLink;
  1284.     long                             reservedH1;
  1285.     long                             reservedH2;
  1286.     MSAMIOCompletionUPP             ioCompletion;
  1287.     OSErr                             ioResult;
  1288.     long                             saveA5;
  1289.     short                             reqCode;
  1290.     MailMsgRef                         mailMsgRef;
  1291.     short                             recipientIndex;                /* recipient index in the original letter */
  1292.     OSErr                             result;                        /* result of sending the recipient */
  1293. };
  1294. typedef struct MSAMPutRecipientReportPB    MSAMPutRecipientReportPB;
  1295. /****************************************************************************************/
  1296.  
  1297. struct MailWakeupPMSAMPB {
  1298.     void *                            qLink;
  1299.     long                             reservedH1;
  1300.     long                             reservedH2;
  1301.     MSAMIOCompletionUPP             ioCompletion;
  1302.     OSErr                             ioResult;
  1303.     long                             saveA5;
  1304.     short                             reqCode;
  1305.     CreationID                         pmsamCID;
  1306.     MailSlotID                         mailSlotID;
  1307. };
  1308. typedef struct MailWakeupPMSAMPB        MailWakeupPMSAMPB;
  1309.  
  1310. struct MailCreateMailSlotPB {
  1311.     void *                            qLink;
  1312.     long                             reservedH1;
  1313.     long                             reservedH2;
  1314.     MSAMIOCompletionUPP             ioCompletion;
  1315.     OSErr                             ioResult;
  1316.     long                             saveA5;
  1317.     short                             reqCode;
  1318.     MailboxRef                         mailboxRef;
  1319.     long                             timeout;
  1320.     CreationID                         pmsamCID;
  1321.     SMCA                             smca;
  1322. };
  1323. typedef struct MailCreateMailSlotPB        MailCreateMailSlotPB;
  1324.  
  1325. struct MailModifyMailSlotPB {
  1326.     void *                            qLink;
  1327.     long                             reservedH1;
  1328.     long                             reservedH2;
  1329.     MSAMIOCompletionUPP             ioCompletion;
  1330.     OSErr                             ioResult;
  1331.     long                             saveA5;
  1332.     short                             reqCode;
  1333.     MailboxRef                         mailboxRef;
  1334.     long                             timeout;
  1335.     CreationID                         pmsamCID;
  1336.     SMCA                             smca;
  1337. };
  1338. typedef struct MailModifyMailSlotPB        MailModifyMailSlotPB;
  1339.  
  1340. union MSAMParam {
  1341.     struct {
  1342.         void *                            qLink;
  1343.         long                             reservedH1;
  1344.         long                             reservedH2;
  1345.         MSAMIOCompletionUPP             ioCompletion;
  1346.         OSErr                             ioResult;
  1347.         long                             saveA5;
  1348.         short                             reqCode;
  1349.     }                                 header;
  1350.  
  1351.     PMSAMGetMSAMRecordPB             pmsamGetMSAMRecord;
  1352.     PMSAMOpenQueuesPB                 pmsamOpenQueues;
  1353.     PMSAMSetStatusPB                 pmsamSetStatus;
  1354.     PMSAMLogErrorPB                 pmsamLogError;
  1355.  
  1356.  
  1357.     SMSAMSetupPB                     smsamSetup;
  1358.     SMSAMStartupPB                     smsamStartup;
  1359.     SMSAMShutdownPB                 smsamShutdown;
  1360.  
  1361.     MSAMEnumeratePB                 msamEnumerate;
  1362.     MSAMDeletePB                     msamDelete;
  1363.  
  1364.     MSAMOpenPB                         msamOpen;
  1365.     MSAMOpenNestedPB                 msamOpenNested;
  1366.     MSAMClosePB                     msamClose;
  1367.     MSAMGetMsgHeaderPB                 msamGetMsgHeader;
  1368.     MSAMGetAttributesPB             msamGetAttributes;
  1369.     MSAMGetRecipientsPB             msamGetRecipients;
  1370.     MSAMGetContentPB                 msamGetContent;
  1371.     MSAMGetEnclosurePB                 msamGetEnclosure;
  1372.     MSAMEnumerateBlocksPB             msamEnumerateBlocks;
  1373.     MSAMGetBlockPB                     msamGetBlock;
  1374.     MSAMMarkRecipientsPB             msamMarkRecipients;
  1375.     MSAMnMarkRecipientsPB             msamnMarkRecipients;
  1376.  
  1377.     MSAMCreatePB                     msamCreate;
  1378.     MSAMBeginNestedPB                 msamBeginNested;
  1379.     MSAMEndNestedPB                 msamEndNested;
  1380.     MSAMSubmitPB                     msamSubmit;
  1381.     MSAMPutMsgHeaderPB                 msamPutMsgHeader;
  1382.     MSAMPutAttributePB                 msamPutAttribute;
  1383.     MSAMPutRecipientPB                 msamPutRecipient;
  1384.     MSAMPutContentPB                 msamPutContent;
  1385.     MSAMPutEnclosurePB                 msamPutEnclosure;            /* this field is SYSTEM8_DEPRECATED*/
  1386.     MSAMPutBlockPB                     msamPutBlock;
  1387.  
  1388.     MSAMCreateReportPB                 msamCreateReport;            /* Reports and Error Handling Calls */
  1389.     MSAMPutRecipientReportPB         msamPutRecipientReport;
  1390.  
  1391.     PMSAMCreateMsgSummaryPB         pmsamCreateMsgSummary;
  1392.     PMSAMPutMsgSummaryPB             pmsamPutMsgSummary;
  1393.     PMSAMGetMsgSummaryPB             pmsamGetMsgSummary;
  1394.  
  1395.     MailWakeupPMSAMPB                 wakeupPMSAM;
  1396.     MailCreateMailSlotPB             createMailSlot;
  1397.     MailModifyMailSlotPB             modifyMailSlot;
  1398. };
  1399. typedef union MSAMParam                    MSAMParam;
  1400. enum { uppMSAMIOCompletionProcInfo = 0x00009802 };                 /* register no_return_value Func(4_bytes:A0) */
  1401. #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  1402.     #pragma parameter CallMSAMIOCompletionProc(__A1, __A0)
  1403.     void CallMSAMIOCompletionProc(MSAMIOCompletionUPP routine, TempMSAMParam * paramBlock) = 0x4E91;
  1404. #else
  1405.     #define CallMSAMIOCompletionProc(userRoutine, paramBlock)     CALL_ONE_PARAMETER_UPP((userRoutine), uppMSAMIOCompletionProcInfo, (paramBlock))
  1406. #endif
  1407. #define NewMSAMIOCompletionProc(userRoutine)                     (MSAMIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMSAMIOCompletionProcInfo, GetCurrentArchitecture())
  1408. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1409. EXTERN_API( OSErr )
  1410. MailCreateMailSlot                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052B, 0xAA5E);
  1411.  
  1412. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1413. EXTERN_API( OSErr )
  1414. MailModifyMailSlot                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x052C, 0xAA5E);
  1415.  
  1416. /* ASYNCHRONOUS ONLY, client must call WaitNextEvent */
  1417. EXTERN_API( OSErr )
  1418. MailWakeupPMSAM                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7001, 0x1F00, 0x3F3C, 0x0507, 0xAA5E);
  1419.  
  1420. /* Personal MSAM Glue Routines */
  1421. EXTERN_API( OSErr )
  1422. PMSAMOpenQueues                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0500, 0xAA5E);
  1423.  
  1424. EXTERN_API( OSErr )
  1425. PMSAMSetStatus                    (MSAMParam *            paramBlock,
  1426.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0527, 0xAA5E);
  1427.  
  1428. /* SYNC ONLY */
  1429. EXTERN_API( OSErr )
  1430. PMSAMGetMSAMRecord                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0506, 0xAA5E);
  1431.  
  1432. /* Server MSAM Glue Routines */
  1433. /* SYNC ONLY */
  1434. EXTERN_API( OSErr )
  1435. SMSAMSetup                        (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0523, 0xAA5E);
  1436.  
  1437. /* SYNC ONLY */
  1438. EXTERN_API( OSErr )
  1439. SMSAMStartup                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0501, 0xAA5E);
  1440.  
  1441. EXTERN_API( OSErr )
  1442. SMSAMShutdown                    (MSAMParam *            paramBlock,
  1443.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0502, 0xAA5E);
  1444.  
  1445. /* Get Interface Glue Routines */
  1446. EXTERN_API( OSErr )
  1447. MSAMEnumerate                    (MSAMParam *            paramBlock,
  1448.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0503, 0xAA5E);
  1449.  
  1450. EXTERN_API( OSErr )
  1451. MSAMDelete                        (MSAMParam *            paramBlock,
  1452.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0504, 0xAA5E);
  1453.  
  1454. EXTERN_API( OSErr )
  1455. MSAMMarkRecipients                (MSAMParam *            paramBlock,
  1456.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0505, 0xAA5E);
  1457.  
  1458. EXTERN_API( OSErr )
  1459. MSAMnMarkRecipients                (MSAMParam *            paramBlock,
  1460.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0512, 0xAA5E);
  1461.  
  1462. EXTERN_API( OSErr )
  1463. MSAMOpen                        (MSAMParam *            paramBlock,
  1464.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0508, 0xAA5E);
  1465.  
  1466. EXTERN_API( OSErr )
  1467. MSAMOpenNested                    (MSAMParam *            paramBlock,
  1468.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0509, 0xAA5E);
  1469.  
  1470. EXTERN_API( OSErr )
  1471. MSAMClose                        (MSAMParam *            paramBlock,
  1472.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050A, 0xAA5E);
  1473.  
  1474. EXTERN_API( OSErr )
  1475. MSAMGetRecipients                (MSAMParam *            paramBlock,
  1476.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050C, 0xAA5E);
  1477.  
  1478. EXTERN_API( OSErr )
  1479. MSAMGetAttributes                (MSAMParam *            paramBlock,
  1480.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050B, 0xAA5E);
  1481.  
  1482. EXTERN_API( OSErr )
  1483. MSAMGetContent                    (MSAMParam *            paramBlock,
  1484.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050D, 0xAA5E);
  1485.  
  1486. EXTERN_API( OSErr )
  1487. MSAMGetEnclosure                (MSAMParam *            paramBlock,
  1488.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050E, 0xAA5E);
  1489.  
  1490. EXTERN_API( OSErr )
  1491. MSAMEnumerateBlocks                (MSAMParam *            paramBlock,
  1492.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x050F, 0xAA5E);
  1493.  
  1494. EXTERN_API( OSErr )
  1495. MSAMGetBlock                    (MSAMParam *            paramBlock,
  1496.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0510, 0xAA5E);
  1497.  
  1498. EXTERN_API( OSErr )
  1499. MSAMGetMsgHeader                (MSAMParam *            paramBlock,
  1500.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0511, 0xAA5E);
  1501.  
  1502. /* Put Interface Glue Routines */
  1503. EXTERN_API( OSErr )
  1504. MSAMCreate                        (MSAMParam *            paramBlock,
  1505.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0514, 0xAA5E);
  1506.  
  1507. EXTERN_API( OSErr )
  1508. MSAMBeginNested                    (MSAMParam *            paramBlock,
  1509.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0515, 0xAA5E);
  1510.  
  1511. EXTERN_API( OSErr )
  1512. MSAMEndNested                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0516, 0xAA5E);
  1513.  
  1514. /*  SYNCHRONOUS ONLY */
  1515. EXTERN_API( OSErr )
  1516. MSAMSubmit                        (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0517, 0xAA5E);
  1517.  
  1518. EXTERN_API( OSErr )
  1519. MSAMPutAttribute                (MSAMParam *            paramBlock,
  1520.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0518, 0xAA5E);
  1521.  
  1522. EXTERN_API( OSErr )
  1523. MSAMPutRecipient                (MSAMParam *            paramBlock,
  1524.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0519, 0xAA5E);
  1525.  
  1526. EXTERN_API( OSErr )
  1527. MSAMPutContent                    (MSAMParam *            paramBlock,
  1528.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051A, 0xAA5E);
  1529.  
  1530. /*  SYNCHRONOUS ONLY */
  1531. EXTERN_API( OSErr )
  1532. MSAMPutEnclosure                (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x051B, 0xAA5E);
  1533.  
  1534. EXTERN_API( OSErr )
  1535. MSAMPutBlock                    (MSAMParam *            paramBlock,
  1536.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051C, 0xAA5E);
  1537.  
  1538. EXTERN_API( OSErr )
  1539. MSAMPutMsgHeader                (MSAMParam *            paramBlock,
  1540.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051D, 0xAA5E);
  1541.  
  1542. /* Reports and Error Handling Glue Routines */
  1543. EXTERN_API( OSErr )
  1544. MSAMCreateReport                (MSAMParam *            paramBlock,
  1545.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x051F, 0xAA5E);
  1546.  
  1547. EXTERN_API( OSErr )
  1548. MSAMPutRecipientReport            (MSAMParam *            paramBlock,
  1549.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0520, 0xAA5E);
  1550.  
  1551. EXTERN_API( OSErr )
  1552. PMSAMLogError                    (MSAMParam *            paramBlock)                            FIVEWORDINLINE(0x7000, 0x1F00, 0x3F3C, 0x0521, 0xAA5E);
  1553.  
  1554. /* MsgSummary Glue Routines */
  1555. EXTERN_API( OSErr )
  1556. PMSAMCreateMsgSummary            (MSAMParam *            paramBlock,
  1557.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0522, 0xAA5E);
  1558.  
  1559. EXTERN_API( OSErr )
  1560. PMSAMPutMsgSummary                (MSAMParam *            paramBlock,
  1561.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0525, 0xAA5E);
  1562.  
  1563. EXTERN_API( OSErr )
  1564. PMSAMGetMsgSummary                (MSAMParam *            paramBlock,
  1565.                                  Boolean                 asyncFlag)                            THREEWORDINLINE(0x3F3C, 0x0526, 0xAA5E);
  1566.  
  1567.  
  1568.  
  1569. #if PRAGMA_STRUCT_ALIGN
  1570.     #pragma options align=reset
  1571. #elif PRAGMA_STRUCT_PACKPUSH
  1572.     #pragma pack(pop)
  1573. #elif PRAGMA_STRUCT_PACK
  1574.     #pragma pack()
  1575. #endif
  1576.  
  1577. #ifdef PRAGMA_IMPORT_OFF
  1578. #pragma import off
  1579. #elif PRAGMA_IMPORT
  1580. #pragma import reset
  1581. #endif
  1582.  
  1583. #ifdef __cplusplus
  1584. }
  1585. #endif
  1586.  
  1587. #endif /* __OCEMAIL__ */
  1588.  
  1589.